#ifndef WITGPIO_H
#define WITGPIO_H

#if 1
//使用stm32平台

#include "main.h"
//此文件声明了stm32的IO操作函数，和uint8_t uint16_t uint32_t

#else
//使用其他MCU平台

#include "stdint.h"
//声明 uint8_t uint16_t uint32_t

#include "xxxx.h"
//声明MCU的IO操作函数

#endif




typedef enum
{
BEEP,
LED_RED,
LED_GREEN,
LED_BLUE,
MAX_WITGPIO
}WITGPIO;

typedef struct
{
uint8_t cmd;
uint32_t time_on;
uint32_t time_off;
uint8_t cnt;
uint8_t cnt_over;
uint32_t tick_start_on;
uint32_t tick_start_off;
}WitGpio_t;

typedef enum
{
ISOFF,
DIRECT_ON,
DIRECT_OFF,
HOLD_ON,
BLINK
}WITGPIO_CMD;

void WitGpio_contrl(WITGPIO n,WITGPIO_CMD cmd,uint32_t time_on,uint32_t time_off,uint8_t cnt);
void WitGpio_task(void);
uint8_t Get_WitGpio_cnt_over(WITGPIO n);
#endif

